package com.community.dao;

import com.community.pojo.QuestionPayRecord;
import org.apache.ibatis.annotations.Param;

public interface QuestionPayRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(QuestionPayRecord record);

    int insertSelective(QuestionPayRecord record);

    QuestionPayRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(QuestionPayRecord record);

    int updateByPrimaryKey(QuestionPayRecord record);

    /**
     * 查询是否有付费记录
     * @param questionId
     * @param userName
     * @return
     */
    int countQuestionIdAndUserName(@Param(value = "questionId") int questionId,
                                   @Param(value = "userName") String userName);
}